package com.mdh.runerrands.serviceImpl;

import com.mdh.runerrands.dao.OrderLineDao;
import com.mdh.runerrands.pojo.OrderLine;
import com.mdh.runerrands.service.OrderLineService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderLineServiceImpl implements OrderLineService {

    @Resource
    private OrderLineDao orderLineDao;
    @Override
    public List<OrderLine> findByOrderId(int orderId) {
        return orderLineDao.selectByOrderId(orderId);
    }

    @Override
    public boolean insert(OrderLine orderLine) {
        return orderLineDao.insert(orderLine);
    }

    @Override
    public List<OrderLine> findByProductId(Integer productId) {
        return orderLineDao.selectByProductId(productId);
    }


}
